1. Field of the Invention
The present invention generally relates to a statistic method for arbitration and more particularly, to a statistic method for arbitration in response to various conditions where a bus is shared by a plurality of peripheral devices, such that a host at arbitration dynamically modulates the peripheral devices' access through the bus by utilizing an attenuation function to perform operation on a preceding cycle.
2. Description of the Prior Art
In a general computer architecture, there are many devices and peripheral devices, between which a plurality of buses are provided for signal transmission and/or data communication. For the sake of high efficiency, a bus is often shared by a plurality of peripheral devices.
However, a bus can only be accessed by a peripheral device during a certain period of time. It has become a key issue to decide which one of the plurality of peripheral devices to access the bus when a number of peripheral devices sharing the same bus are required to access the bus at the same time.
Generally speaking, an ideal arbitration architecture is required to satisfy the requirements: fairness and efficiency. A fair arbitrator protects any peripheral device from neither being completely forbidden to access through the bus nor being not granted an unreasonably long time to access through the bus, even if the peripheral device has a very low priority. An ideal arbitrator granting the bus to be efficiently accessed, however, is able to let a peripheral device with higher priority unfairly get access through the bus. Moreover, some of the peripheral devices are limited in bandwidth. In other words, the arbitrator must be able to provide the peripheral devices with a certain amount of bandwidth such that the peripheral devices can operate without problems. More particularly, the industry has developed various ways to give consideration to both sides of improving the efficiency and maintaining the bandwidth and fairness for the peripheral devices.
Please refer to FIG. 1, which is a block diagram schematically illustrating a conventional arbitration system. The arbitration system comprises a common bus 12, which is connected to a main bridge 10. The main bridge 10 comprises a bus arbitrator 105 so as to arbitrate a plurality of peripheral devices connected to the bus 12. Moreover, a main controller 14 is provided so as to control a plurality of peripheral devices such as the first peripheral device 161, the second peripheral device 163, the third peripheral device 165, and the fourth peripheral device 167. The plurality of peripheral devices are connected to the bus 12 through the main controller 14. Meanwhile, an arbitrator 145 in the main controller 14 is used to determine which peripheral device has the higher priority.
In the above-mentioned system, even though some peripheral devices may request a lowest limit in bandwidth that the bus 12 can provide, the lowest limit in bandwidth can change in response to the operation of the system. If the arbitrator 145 arbitrates the peripheral devices according to their requests in bandwidth, it usually occurs that the peripheral device requesting a higher lowest limit in bandwidth occupies most of the operation time of the bus 12. Accordingly, the other peripheral devices can hardly get access through the bus 12 even when the former peripheral device is idle.
In order to overcome the afore-mentioned problem, the industry has developed a method, in which a register (not shown) is provided in the main controller 14 so as to keep track of the conditions of the peripheral devices granted to get access to the bus. As shown in FIG. 2, which is a schematic diagram showing a conventional statistic method for arbitration. In FIG. 2, the numbers indicate the number of times each peripheral device is granted to get access through the bus. In other words, the column corresponding to the first peripheral device counts 1 when the peripheral devices request access through the bus and the first peripheral device gets access through the bus. Moreover, the column corresponding to the first peripheral device counts 2 when the first peripheral device gets access through the bus again. Similarly, the columns corresponding to the second and the third peripheral devices count the same way.
Since any peripheral device can not possibly keep operating with its highest load, the demand for access through the bus for each peripheral device varies with time. Accordingly, the arbitrator in the main controller analyzes the demand for access through the bus for each peripheral device by using the statistic number in the register after a pre-determined period of time (for example, 1000 clock pulses), thereby rearranging the priority and number of times each peripheral device is granted to get access through the bus. As a result, the problem that fixed allocation of bus bandwidth results in low efficiency can be overcome.
However, the above-mentioned method can only provide a follow-up cycle only when the former cycle of counting has been lasting for a certain period of time. In other words, the arbitration system can not respond to the demand for access through the bus for each peripheral device immediately such that the arbitration system may fail to arbitrate the peripheral devices when one of the peripheral devices has stronger demand than the others.
Therefore, there is need in providing a statistic method for arbitration so as to overcome the aforementioned problems.